﻿using System;
using System.Collections.Generic;
using Domain.Model.Commons.Atrributes;
using System.Text;

namespace Domain.Model.Commons
{
    public abstract class AbstractEntity : IDomainIdentifer<string>
    {
        [PrimaryKey("id", Generator = IdGenerators.Assigned)]
        public virtual string Id { get; set; }

        [Property("name")]
        public virtual string Name { get; set; }

        [Property("create_time")]
        public virtual DateTime CreateTime { get; set; }

        [Property("create_user")]
        public virtual string CreateUser { get; set; }

        public override string ToString()
        {
            return new StringBuilder("Id : " + Id + "\tName : " + Name + "\tCreateUser : " + CreateUser + "\tCreateTime : " + CreateTime).ToString();
        }
    }
}
